home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-10-31 | 3.5 KB | 77 lines | [TEXT/GEOL] |
- Item 5107515 30-Oct-89 13:57
-
- From: D1282 Power Up,PRT
-
- To: D2022 Strata, Gary Bringhurst,PRT
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: Re-More Eiffel Stuff
-
- Dear Mr. Bringhurst,
-
- Thank you for your recent link regarding Eiffel (Item 1309297, 89/10/17,
- 18:57). I apologise for my slow response; the earthquake shook me up a little,
- and my wife had a baby last week, which also occupied rather a lot of my time.
-
- Your link mentioned three topics that I would like to respond to: garbage
- collection in Eiffel, protected members (as in C++), and inline substitution in
- Eiffel.
-
- As to garbage collection, I agree whole-heartedly that garbage collection can
- be a good thing; I would go so far as to say that elegant, small,
- well-implemented garbage collection would be a great boon to programmers
- everywhere. I've chased down too many bugs related to memory management to
- feel otherwise. I have some doubts as to how well Eiffel's garbage collection
- algorithms will meld with the Mac's memory management.
-
- You mention that you like C++'s protected class members (features), saying
- "[t]here are many occasions when a class designer may want to make a facility
- available to descendents, but not to other clients."
-
- First, as a minor matter of semantics, let me point out that a descendant is
- not a client, nor vice versa. A descendant of class Foo has an "is-a"
- relationship with Foo, while a client has a "has-a" relationship with Foo.
-
- As to the matter of Eiffel's lack of a protected mode, I am confused. Can't
- the class designer simply not export the features she wishes to hide from the
- client? If the designer wishes to hide one of Foo's features (say, Bar) from
- its clients, then the designer need only exclude Bar from Foo's export clause,
- and voila — no client of Foo can access Bar. However, all descendants of Foo
- can access all of the features of Foo, exporting them or not as they see fit.
- This issue is discussed in Meyer's book, in section 11.5 (Inheritance and
- Information Hiding), found on pages 272-274. This section also emphasizes the
- difference between a client and a descendant — a distinction missing from your
- link, as mentioned above.
-
- It would appear from the discussion in Meyer's book that Eiffel's mechanism
- (including selective exports) is both simpler and more powerful that C++'s
- private, public, and protected modes. If you have a counter-example, which
- shows C++'s mechanism to be superior or even equal, I would love to see it.
- If, similarly, you can present any other arguments against the Eiffel
- inheritance/export clause mechanism, I would like to see those, too. This is
- not an area of Eiffel that I have explored to any great depth, and I would like
- to hear the comments of others on it, especially as it relates to C++.
-
- Lastly, you mention that you are "also uncomfortable with the inline
- substitution technique referenced in the Eiffel documentation." I'm afraid
- you've got me by the short hairs on this one — what inline substitution
- technique are you refering to? What are its weaknesses, as you see them, that
- make you uncomfortable? What do you see as alternatives, and what advantages
- do they have over the Eiffel technique?
-
- Thanks again for your link. I'm looking forward to your response to this one.
- Until then, I will remain
-
-
- Yours,
-
- James Plamondon
- Software Engineer
- PowerUp! Software
- 2929 Campus Drive, Suite 300
- San Mateo, CA 94403
- (415) 345-5900 x351
- AppleLink: D1282
-
-